package com.eshop.modules.quartz.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("quartz_job")
public class QuartzJob extends BaseDomain
{
    public static final String JOB_KEY = "JOB_KEY";
    @TableId
    private Long id;
    private String beanName;
    private String cronExpression;
    private Boolean isPause;
    private String jobName;
    private String methodName;
    private String params;
    private String remark;
    
    public void copy(final QuartzJob source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public Long getId() {
        return this.id;
    }
    
    public String getBeanName() {
        return this.beanName;
    }
    
    public String getCronExpression() {
        return this.cronExpression;
    }
    
    public Boolean getIsPause() {
        return this.isPause;
    }
    
    public String getJobName() {
        return this.jobName;
    }
    
    public String getMethodName() {
        return this.methodName;
    }
    
    public String getParams() {
        return this.params;
    }
    
    public String getRemark() {
        return this.remark;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setBeanName(final String beanName) {
        this.beanName = beanName;
    }
    
    public void setCronExpression(final String cronExpression) {
        this.cronExpression = cronExpression;
    }
    
    public void setIsPause(final Boolean isPause) {
        this.isPause = isPause;
    }
    
    public void setJobName(final String jobName) {
        this.jobName = jobName;
    }
    
    public void setMethodName(final String methodName) {
        this.methodName = methodName;
    }
    
    public void setParams(final String params) {
        this.params = params;
    }
    
    public void setRemark(final String remark) {
        this.remark = remark;
    }
    
    public String toString() {
        return "QuartzJob(id=" + this.getId() + ", beanName=" + this.getBeanName() + ", cronExpression=" + this.getCronExpression() + ", isPause=" + this.getIsPause() + ", jobName=" + this.getJobName() + ", methodName=" + this.getMethodName() + ", params=" + this.getParams() + ", remark=" + this.getRemark() + ")";
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof QuartzJob)) {
            return false;
        }
        final QuartzJob other = (QuartzJob)o;
        if (!other.canEqual(this)) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0075: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0075;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0075;
            }
            return false;
        }
        final Object this$isPause = this.getIsPause();
        final Object other$isPause = other.getIsPause();
        Label_0112: {
            if (this$isPause == null) {
                if (other$isPause == null) {
                    break Label_0112;
                }
            }
            else if (this$isPause.equals(other$isPause)) {
                break Label_0112;
            }
            return false;
        }
        final Object this$beanName = this.getBeanName();
        final Object other$beanName = other.getBeanName();
        Label_0149: {
            if (this$beanName == null) {
                if (other$beanName == null) {
                    break Label_0149;
                }
            }
            else if (this$beanName.equals(other$beanName)) {
                break Label_0149;
            }
            return false;
        }
        final Object this$cronExpression = this.getCronExpression();
        final Object other$cronExpression = other.getCronExpression();
        Label_0186: {
            if (this$cronExpression == null) {
                if (other$cronExpression == null) {
                    break Label_0186;
                }
            }
            else if (this$cronExpression.equals(other$cronExpression)) {
                break Label_0186;
            }
            return false;
        }
        final Object this$jobName = this.getJobName();
        final Object other$jobName = other.getJobName();
        Label_0223: {
            if (this$jobName == null) {
                if (other$jobName == null) {
                    break Label_0223;
                }
            }
            else if (this$jobName.equals(other$jobName)) {
                break Label_0223;
            }
            return false;
        }
        final Object this$methodName = this.getMethodName();
        final Object other$methodName = other.getMethodName();
        Label_0260: {
            if (this$methodName == null) {
                if (other$methodName == null) {
                    break Label_0260;
                }
            }
            else if (this$methodName.equals(other$methodName)) {
                break Label_0260;
            }
            return false;
        }
        final Object this$params = this.getParams();
        final Object other$params = other.getParams();
        Label_0297: {
            if (this$params == null) {
                if (other$params == null) {
                    break Label_0297;
                }
            }
            else if (this$params.equals(other$params)) {
                break Label_0297;
            }
            return false;
        }
        final Object this$remark = this.getRemark();
        final Object other$remark = other.getRemark();
        if (this$remark == null) {
            if (other$remark == null) {
                return true;
            }
        }
        else if (this$remark.equals(other$remark)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof QuartzJob;
    }
    
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $isPause = this.getIsPause();
        result = result * 59 + (($isPause == null) ? 43 : $isPause.hashCode());
        final Object $beanName = this.getBeanName();
        result = result * 59 + (($beanName == null) ? 43 : $beanName.hashCode());
        final Object $cronExpression = this.getCronExpression();
        result = result * 59 + (($cronExpression == null) ? 43 : $cronExpression.hashCode());
        final Object $jobName = this.getJobName();
        result = result * 59 + (($jobName == null) ? 43 : $jobName.hashCode());
        final Object $methodName = this.getMethodName();
        result = result * 59 + (($methodName == null) ? 43 : $methodName.hashCode());
        final Object $params = this.getParams();
        result = result * 59 + (($params == null) ? 43 : $params.hashCode());
        final Object $remark = this.getRemark();
        result = result * 59 + (($remark == null) ? 43 : $remark.hashCode());
        return result;
    }
}
